using System.ComponentModel.DataAnnotations;

namespace TerritoryGame.Application.Dtos;

/// <summary>
/// 创建知识库DTO
/// </summary>
public class CreateKnowledgeBaseDto
{
    [Required(ErrorMessage = "用户ID不能为空")]
    public Guid UserId { get; set; }
    
    [Required(ErrorMessage = "知识库名称不能为空")]
    [StringLength(100, ErrorMessage = "知识库名称长度不能超过100个字符")]
    public string KnowledgeBaseName { get; set; } = null!;
    
    [StringLength(500, ErrorMessage = "知识库描述长度不能超过500个字符")]
    public string? KnowledgeBaseDescription { get; set; }
    
    public bool IsPublic { get; set; } = false;
}

/// <summary>
/// 更新知识库DTO
/// </summary>
public class UpdateKnowledgeBaseDto
{
    [Required(ErrorMessage = "知识库ID不能为空")]
    public Guid KnowledgeBaseId { get; set; }
    
    [Required(ErrorMessage = "知识库名称不能为空")]
    [StringLength(100, ErrorMessage = "知识库名称长度不能超过100个字符")]
    public string KnowledgeBaseName { get; set; } = null!;
    
    [StringLength(500, ErrorMessage = "知识库描述长度不能超过500个字符")]
    public string? KnowledgeBaseDescription { get; set; }
    
    public bool IsPublic { get; set; }
}
